package com.dayuanit.dy15.atm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
public class PageController {

    public PageController() {
        System.out.println("PageController()");
    }

    /**
     * URL地址映射 不能重复映射，访问的时候会报错。
     * @return
     */
//    @RequestMapping(value = "/user/toLogin.do")
//    public String welcome() {
//        return "login";
//    }

    /**
     * 多个 URL地址可以映射同一个方法
     * @return
     */
    @RequestMapping(value = {"/", "/user/toLogin.do"})
    public String toLogin() {
        System.out.println(">>>>>toLogin controller");
        return "login";
    }

    @RequestMapping("/user/toIndex.do")
    public String toIndex() {
        return "index";
    }

    @RequestMapping("/flow/toFlow")
    public String toFlow() {
        return "flow";
    }

    @RequestMapping("/card/toDraw.do")
    public String toDraw() {
        return "draw";
    }

    @RequestMapping("/card/toDeposit.do")
    public String toDeposit() {
        return "deposit";
    }

    @RequestMapping(value = "/card/toTransfer.do")
    public String toTransfer() {
        return "transfer";
    }

    @RequestMapping("/card/toOpenaccount.do")
    public String toOpenacount() {
        return "openaccount";
    }

    @RequestMapping("/email/toEmail.do")
    public String toEmail() {
        return "email";
    }

    @RequestMapping("/user/toRegister.do")
    public String toRegister() {
        return "sign";
    }

    @RequestMapping("/user/toForgetPwd.do")
    public String toForgetPwd() {
        return "forgetPwd";
    }

}
